package com.hksj.common.quartz.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @author chenxingqing
 */
@Data
@ApiModel
@TableName("d_cron_job")
public class CronJob implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "任务名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "任务分组")
    @TableField("group_name")
    private String groupName;

    @ApiModelProperty(value = "任务类")
    @TableField("job_class")
    private String jobClass;

    @ApiModelProperty(value = "任务类型 11 = 开空调  12 = 开灯  21 = 关空调 22 = 关灯")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "分")
    @TableField("minute")
    private String minute;

    @ApiModelProperty(value = "时")
    @TableField("hour")
    private String hour;

    @ApiModelProperty(value = "日期")
    @TableField("day")
    private String day;

    @ApiModelProperty(value = "周")
    @TableField("week")
    private String week;

    @ApiModelProperty(value = "状态 0 = 未运行 1 = 运行中")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateTime;
}
